package com.xd.server.apply.dto;

import com.alibaba.fastjson.annotation.JSONField;
import com.xd.common.page.PaginationQuery;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Getter;
import lombok.NoArgsConstructor;
import lombok.Setter;
import org.springframework.format.annotation.DateTimeFormat;

import javax.validation.constraints.DecimalMax;
import javax.validation.constraints.DecimalMin;
import javax.validation.constraints.Size;
import java.util.Date;

/**
 * 申请表(Apply)传输类
 *
 * @author xiaodi
 * @since 2021-07-10 13:28:45
 */

@Getter
@Setter
@NoArgsConstructor
@AllArgsConstructor
@ApiModel(value = "com.xd.server.apply.dto.ApplyDTO", description = "申请表DTO")
public class ApplyDTO extends PaginationQuery {
    private static final long serialVersionUID = -87595726237179187L;
    @ApiModelProperty(value = "主键", dataType = "Long", example = "主键")
    private Long id;

    @ApiModelProperty(value = "关联事件类型：1案件 2事件", dataType = "Integer", required = true, example = "1")
    @DecimalMin(message = "关联事件类型：1案件 2事件,应当大于等于于{value}", value = "0")
    @DecimalMax(message = "关联事件类型：1案件 2事件,应当小于等于{value}", value = "1000")
    private Integer eventType;

    private Long eventId;

    @ApiModelProperty(value = "编号按规则生成20位", dataType = "String", required = true, example = "编号按规则生成20位")
    @Size(message = "编号按规则生成20位应小于{max}", max = 100)
    private String applyNumber;

    @ApiModelProperty(value = "填表单位id", dataType = "String", required = true, example = "填表单位id")
    @Size(message = "填表单位id应小于{max}", max = 100)
    private String applyGroupId;

    @ApiModelProperty(value = "填表时间", dataType = "String", required = true, example = "2021-07-10 13:28:45")
    @JSONField(format = "yyyy-MM-dd HH:mm:ss", name = "applyTime")
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private Date applyTime;

    @ApiModelProperty(value = "承办人", dataType = "String", required = true, example = "承办人")
    @Size(message = "承办人应小于{max}", max = 100)
    private String userId;

    @ApiModelProperty(value = "联系方式", dataType = "String", required = true, example = "联系方式")
    @Size(message = "联系方式应小于{max}", max = 100)
    private String phone;

    @ApiModelProperty(value = "基本情况，只能增加不能删减内容", dataType = "String", required = true, example = "基本情况，只能增加不能删减内容")
    @Size(message = "基本情况，只能增加不能删减内容应小于{max}", max = 100)
    private String basicSituation;

    @ApiModelProperty(value = "使用资源", dataType = "String", required = true, example = "使用资源")
    @Size(message = "使用资源应小于{max}", max = 100)
    private String useResources;

    @ApiModelProperty(value = "使用目的", dataType = "String", required = true, example = "使用目的")
    @Size(message = "使用目的应小于{max}", max = 100)
    private String usePurpose;

    @ApiModelProperty(value = "对象数", dataType = "Integer", required = true, example = "1")
    @DecimalMin(message = "对象数,应当大于等于于{value}", value = "0")
    @DecimalMax(message = "对象数,应当小于等于{value}", value = "1000")
    private Integer objectNum;

    @ApiModelProperty(value = "目标数", dataType = "Integer", required = true, example = "1")
    @DecimalMin(message = "目标数,应当大于等于于{value}", value = "0")
    @DecimalMax(message = "目标数,应当小于等于{value}", value = "1000")
    private Integer targetNum;

    @ApiModelProperty(value = "特定信息数", dataType = "Integer", required = true, example = "1")
    @DecimalMin(message = "特定信息数,应当大于等于于{value}", value = "0")
    @DecimalMax(message = "特定信息数,应当小于等于{value}", value = "1000")
    private Integer infoNum;

    @ApiModelProperty(value = "手动查询起始时间", dataType = "String", required = true, example = "2021-07-10 13:28:45")
    @JSONField(format = "yyyy-MM-dd HH:mm:ss", name = "queryStartTime")
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private Date queryStartTime;

    @ApiModelProperty(value = "手动查询截至时间", dataType = "String", required = true, example = "2021-07-10 13:28:45")
    @JSONField(format = "yyyy-MM-dd HH:mm:ss", name = "queryEndTime")
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private Date queryEndTime;

    @ApiModelProperty(value = "自动监控起始时间", dataType = "String", required = true, example = "2021-07-10 13:28:45")
    @JSONField(format = "yyyy-MM-dd HH:mm:ss", name = "monitorStartTime")
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private Date monitorStartTime;

    @ApiModelProperty(value = "自动监控截至时间", dataType = "String", required = true, example = "2021-07-10 13:28:45")
    @JSONField(format = "yyyy-MM-dd HH:mm:ss", name = "monitorEndTime")
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private Date monitorEndTime;

    @ApiModelProperty(value = "备注", dataType = "String", required = true, example = "备注")
    @Size(message = "备注应小于{max}", max = 100)
    private String remark;

    @ApiModelProperty(value = "申请状态 1：审批中 2：已完成 3：已驳回 4：已作废 5：已回复 6：待打印", dataType = "Integer", required = true, example = "1")
    @DecimalMin(message = "申请状态 1：审批中 2：已完成 3：已驳回 4：已作废 5：已回复 6：待打印,应当大于等于于{value}", value = "0")
    @DecimalMax(message = "申请状态 1：审批中 2：已完成 3：已驳回 4：已作废 5：已回复 6：待打印,应当小于等于{value}", value = "1000")
    private Integer applyState;

    @ApiModelProperty(value = "关联事件名称", dataType = "String", required = true, example = "关联事件名称")
    @Size(message = "关联事件名称应小于{max}", max = 100)
    private String eventName;

    @ApiModelProperty(value = "当前审批人id", dataType = "String", required = true, example = "当前审批人id")
    @Size(message = "当前审批人id应小于{max}", max = 100)
    private String approveUserId;

    @ApiModelProperty(value = "创建时间", dataType = "String", required = true, example = "2021-07-10 13:28:45")
    @JSONField(format = "yyyy-MM-dd HH:mm:ss", name = "createTime")
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private Date createTime;

    @ApiModelProperty(value = "创建人Id", dataType = "String", required = true, example = "创建人Id")
    @Size(message = "创建人Id应小于{max}", max = 100)
    private String createUserId;

    @ApiModelProperty(value = "0：未打印 1：已打印", dataType = "Integer", required = true, example = "1")
    @DecimalMin(message = "0：未打印 1：已打印,应当大于等于于{value}", value = "0")
    @DecimalMax(message = "0：未打印 1：已打印,应当小于等于{value}", value = "1000")
    private Integer isPrint;

}
